<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="style.css" rel="stylesheet">
<script language="javaScript" src="" >
</script>
<title>倒计时</title>
</head>
<body onload="countdown('2018年国庆节','10/1/2018',countDown);">
<table width="350" height="450" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="bottom" ><table width="346" height="418" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="76">		</td>
        <td width="270">
<div id="countDown"><b>——</b></div>
<script language="javascript">
function countdown(title,Intime,divId){
	var online= new Date(Intime);
	var now = new Date();
	var leave = online.getTime() - now.getTime();
	var day = Math.floor(leave / (1000 * 60 * 60 * 24))+1;
	if (day > 1){ 
				divId.innerHTML="<b>——距"+ title+"还有"+day +"天！</b>";
	}else{
		 if (day == 1) {
				divId.innerHTML="<b>——明天就是"+title+"啦!</b>";
		}else{
			 if (day == 0) {divId.innerHTML="<b>今天就是"+title+"呀！</b>";
			 }else{
					divId.innerHTML="<b>——唉呀！"+title+"已经过了！</b>";
			}
		}
	}
}
</script>
		</td>
      </tr>
    </table></td>
  </tr>
</table>

</body>
</html>
